unit uModuleBookmarks;

{$mode objfpc}{$H+}

interface

uses
    Forms,

    uDataMain;

type

    { TModuleBookmarks }

    TModuleBookmarks = class
    private
        FDataModule: TDtaMain;
    protected
        procedure Init; virtual;
        procedure Done; virtual;
    public
        constructor Create;
        destructor Destroy; override;
    end;

implementation

{ TModuleBookmarks }

procedure TModuleBookmarks.Init;
begin
    FDataModule := TDtaMain.Create(Application);
    FDataModule.LibLoader.LibraryName := './lib/sqlite3';
    FDataModule.LibLoader.Enabled := True;

    FDataModule.Conn.DatabaseName := './data/bm.s3db';
    FDataModule.Conn.Connected := True;
end;

procedure TModuleBookmarks.Done;
begin
    FDataModule.Free;
end;

constructor TModuleBookmarks.Create;
begin
    inherited Create;

    Init;
end;

destructor TModuleBookmarks.Destroy;
begin
    Done;

    inherited Destroy;
end;

end.

